package com.m2bshop.shop.service.impl;

import com.m2bshop.shop.dao.FavoritesDao;
import com.m2bshop.shop.dao.JMFgoodsDao;
import com.m2bshop.shop.pojo.Favorites;
import com.m2bshop.shop.pojo.JMFgoods;
import com.m2bshop.shop.service.FavoritesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author asus
 * @create 2022/6/14 0:06
 */
@Service
public class FavoriteServiceImpl implements FavoritesService {
    @Autowired
    private FavoritesDao favoritesDao;

    public List<Favorites> queryAll(int userId) {
        List<Favorites> favoritesList = favoritesDao.GetGoodsList(userId);
        return favoritesList;
    }

    @Override
    public void dele(int id) {
        favoritesDao.dele(id);
    }
}
